﻿using System;
using System.Collections.Generic;
using System.Text;
using Ninject.Core;

namespace Forecast.Domain.Implementation
{
    class Player : IPlay
    {
        #region Variables

        private ICountMoney _wallet;
        private IOwn _portfolio;
        private string _name;

        #endregion
        #region Constructors

        [Inject]
        public Player(ICountMoney wallet, IOwn portfolio, string name)
        {
            if (wallet == null)
                throw new ArgumentNullException("wallet");
            if (portfolio == null)
                throw new ArgumentNullException("portfolio");
            if (name == null)
                throw new ArgumentNullException("name");

            _wallet = wallet;
            _portfolio = portfolio;
            _name = name;
        }

        #endregion
        #region Properties

        public IOwn Portfolio 
        {
            get { return _portfolio; }
        }

        public ICountMoney Wallet 
        {
            get { return _wallet; }
        }

        public string Name
        {
            get { return _name; }
        }

        #endregion
    }
}
